Optimal. Leaf size=57 \[ \frac {(A+C) \tan (c+d x)}{a d (\sec (c+d x)+1)}+\frac {C \tan (c+d x)}{a d}-\frac {C \tanh ^{-1}(\sin (c+d x))}{a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.15, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {4083, 3998, 3770, 3794} \[ \frac {(A+C) \tan (c+d x)}{a d (\sec (c+d x)+1)}+\frac {C \tan (c+d x)}{a d}-\frac {C \tanh ^{-1}(\sin (c+d x))}{a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3770
Rule 3794
Rule 3998
Rule 4083
Rubi steps
\begin {align*} \int \frac {\sec (c+d x) \left (A+C \sec ^2(c+d x)\right )}{a+a \sec (c+d x)} \, dx &=\frac {C \tan (c+d x)}{a d}+\frac {\int \frac {\sec (c+d x) (a A-a C \sec (c+d x))}{a+a \sec (c+d x)} \, dx}{a}\\ &=\frac {C \tan (c+d x)}{a d}-\frac {C \int \sec (c+d x) \, dx}{a}+(A+C) \int \frac {\sec (c+d x)}{a+a \sec (c+d x)} \, dx\\ &=-\frac {C \tanh ^{-1}(\sin (c+d x))}{a d}+\frac {C \tan (c+d x)}{a d}+\frac {(A+C) \tan (c+d x)}{d (a+a \sec (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 2.04, size = 227, normalized size = 3.98 \[ \frac {4 \cos \left (\frac {1}{2} (c+d x)\right ) \cos (c+d x) \left (A+C \sec ^2(c+d x)\right ) \left ((A+C) \sec \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right )+C \cos \left (\frac {1}{2} (c+d x)\right ) \left (\frac {\sin (d x)}{\left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\sin \left (\frac {c}{2}\right )+\cos \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )}+\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )\right )\right )}{a d (\sec (c+d x)+1) (A \cos (2 (c+d x))+A+2 C)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.46, size = 109, normalized size = 1.91 \[ -\frac {{\left (C \cos \left (d x + c\right )^{2} + C \cos \left (d x + c\right )\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (C \cos \left (d x + c\right )^{2} + C \cos \left (d x + c\right )\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left ({\left (A + 2 \, C\right )} \cos \left (d x + c\right ) + C\right )} \sin \left (d x + c\right )}{2 \, {\left (a d \cos \left (d x + c\right )^{2} + a d \cos \left (d x + c\right )\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.53, size = 101, normalized size = 1.77 \[ -\frac {\frac {C \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a} - \frac {C \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a} - \frac {A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a} + \frac {2 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} a}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.57, size = 121, normalized size = 2.12 \[ \frac {A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}+\frac {C \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}-\frac {C}{a d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) C}{a d}-\frac {C}{a d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) C}{a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.34, size = 144, normalized size = 2.53 \[ -\frac {C {\left (\frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a} - \frac {2 \, \sin \left (d x + c\right )}{{\left (a - \frac {a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )} - \frac {A \sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.60, size = 72, normalized size = 1.26 \[ \frac {2\,C\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}-\frac {2\,C\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (A+C\right )}{a\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {A \sec {\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx + \int \frac {C \sec ^{3}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________